<template>
	<view class="detail">
		<swiper style="height: 500px;" indicator-dots :circular="true" :autoplay="true" interval="3000" >
			<swiper-item v-for="item in lun">
				<image :src="'http://124.93.196.45:10001'+item.imgUrl" style="width: 100%; height: 100%;"></image>
			</swiper-item>
		</swiper>
		<text style="font-size: 28px;">简介</text>
		<view class="d1" style="font-size: 17px;">
			<rich-text :nodes="detail.brief"></rich-text>
		</view>
		<u-button type="primary" text="预约挂号" style="margin-top: 30px;" @click="tonext"></u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				lun:[],
				detail:{}
			}
		},
		onLoad(options) {
			this.id=options.id
			this.getlunbo()
			this.getdetal()
		},
		methods: {
			getlunbo(){
				this.api.get('/prod-api/api/hospital/banner/list?hospitalId='+this.id).then(res=>{
					this.lun=res.data.data
				})
			},
			getdetal(){
				this.api.get('/prod-api/api/hospital/hospital/'+this.id).then(res=>{
					this.detail=res.data.data
				})
			},
			tonext(){
				uni.navigateTo({
					url:'/pages/serve/hospital/guahao/guahao'
				})
			}
		}
	}
</script>

<style>

</style>
